import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/Home.vue'
import Singer from '../components/singer/singer'
import Rank from '../components/rank/rank'
import Recommend from '../components/recommend/recommend'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
     redirect: '/recommend'
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
      {
          path: '/singer',
          name: 'singer',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('components/singer/singer')
      },
      {
          path: '/rank',
          name: 'rank',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('components/rank/rank')
      },
      {
          path: '/recommend',
          name: 'recommend',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import('components/recommend/recommend')
      },
      {
          path: '/search',
          name: 'search',
          // route level code-splitting
          // this generates a separate chunk (about.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import(/* webpackChunkName: "search" */ '../components/search/search')
      },
  ]
})
